package com.situ.week1.homework;

import org.junit.Test;

public class Test1 {
    @Test
    public void test1() {
        int[] array = {2, 34, 1, 54 ,34};
        int max = getMax(array);
        System.out.println(max);
    }

    private int getMax(int[] array) {
        int max = 0;
        for (int i = 0; i < array.length; i++) {
            if (array[i] >= max) {
                max = array[i];
            }
        }
        return max;
    }

}
